package org.lingshi.common.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.lingshi.common.entity.Specification;
import org.lingshi.common.entity.SpecificationOptions;

import java.util.List;

public interface ISpecificationService {
    void add(Specification specification);

    void update(Specification specification);

    Specification findById(Long id);

    void delete(Long id);

    List<Specification> findByProductTypeId(Long productTypeId);

    Page<Specification> search(int page, int size);

    /**
     * 新增商品规格的选项
     * @param specificationOptions
     */
    void addOption(SpecificationOptions specificationOptions);

    /**
     * 批量删除规格的选项
     * @param ids
     */
    void deleteOption(Long[] ids);
}
